/*
 * 品牌模块
 */

// 品牌列表
export function fetchList() {
  const data = {
    "code": 200,
    "message": "操作成功",
    "data": {
      "pageNum": 1,
      "pageSize": 100,
      "totalPage": 1,
      "total": 11,
      "list": [{
        "id": 6,
        "name": "小米",
        "firstLetter": "M",
        "sort": 500,
        "factoryStatus": 1,
        "showStatus": 1,
        "productCount": 100,
        "productCommentCount": 100,
        "logo": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180518/5a912944N474afb7a.png",
        "bigPic": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180518/5afd7778Nf7800b75.jpg",
        "brandStory": null
      }, {
        "id": 49,
        "name": "七匹狼",
        "firstLetter": "S",
        "sort": 200,
        "factoryStatus": 1,
        "showStatus": 1,
        "productCount": 77,
        "productCommentCount": 400,
        "logo": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180518/1522738681.jpg",
        "bigPic": null,
        "brandStory": null
      }, {
        "id": 50,
        "name": "海澜之家",
        "firstLetter": "H",
        "sort": 200,
        "factoryStatus": 1,
        "showStatus": 1,
        "productCount": 66,
        "productCommentCount": 300,
        "logo": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/LOGO1024.png",
        "bigPic": "",
        "brandStory": null
      }, {
        "id": 51,
        "name": "苹果",
        "firstLetter": "A",
        "sort": 200,
        "factoryStatus": 1,
        "showStatus": 1,
        "productCount": 55,
        "productCommentCount": 200,
        "logo": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/timg.jpg",
        "bigPic": null,
        "brandStory": null
      }, {
        "id": 2,
        "name": "三星",
        "firstLetter": "S",
        "sort": 100,
        "factoryStatus": 1,
        "showStatus": 1,
        "productCount": 100,
        "productCommentCount": 100,
        "logo": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/timg (1).jpg",
        "bigPic": null,
        "brandStory": null
      }, {
        "id": 3,
        "name": "华为",
        "firstLetter": "H",
        "sort": 100,
        "factoryStatus": 1,
        "showStatus": 0,
        "productCount": 100,
        "productCommentCount": 100,
        "logo": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/timg (2).jpg",
        "bigPic": null,
        "brandStory": null
      }, {
        "id": 4,
        "name": "格力",
        "firstLetter": "G",
        "sort": 30,
        "factoryStatus": 1,
        "showStatus": 0,
        "productCount": 100,
        "productCommentCount": 100,
        "logo": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/timg (3).jpg",
        "bigPic": null,
        "brandStory": null
      }, {
        "id": 5,
        "name": "方太",
        "firstLetter": "F",
        "sort": 20,
        "factoryStatus": 1,
        "showStatus": 0,
        "productCount": 100,
        "productCommentCount": 100,
        "logo": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/timg (4).jpg",
        "bigPic": null,
        "brandStory": null
      }, {
        "id": 1,
        "name": "万和",
        "firstLetter": "W",
        "sort": 0,
        "factoryStatus": 1,
        "showStatus": 1,
        "productCount": 100,
        "productCommentCount": 100,
        "logo": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/timg(5).jpg",
        "bigPic": "",
        "brandStory": null
      }, {
        "id": 21,
        "name": "OPPO",
        "firstLetter": "O",
        "sort": 0,
        "factoryStatus": 1,
        "showStatus": 1,
        "productCount": 88,
        "productCommentCount": 500,
        "logo": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/timg(6).jpg",
        "bigPic": "",
        "brandStory": null
      }, {
        "id": 58,
        "name": "NIKE",
        "firstLetter": "N",
        "sort": 0,
        "factoryStatus": 1,
        "showStatus": 1,
        "productCount": 33,
        "productCommentCount": 100,
        "logo": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180615/timg (51).jpg",
        "bigPic": "",
        "brandStory": null
      }]
    }
  }
  return {
    url: 'brand/fetchList',
    type: 'post',
    data: data
  }
}

export function updateBrand() {
  const data = {
    "code": 200,
    "msg": '更新成功',
    "data": {}
  }
  return {
    url: 'brand/update',
    method: 'post',
    data: data
  }
}

export function updateShowStatus() {
  const data = {
    "code": 200,
    "msg": '更新成功',
    "data": {}
  }
  return {
    url: 'brand/updateShowStatus',
    method: 'get',
    data: data
  }
}

export function getBrand() {
  const data = {
    "code": 200,
    "message": "操作成功",
    "data": {
      "id": 2,
      "name": "三星",
      "firstLetter": "S",
      "sort": 100,
      "showStatus": 1,
      "logo": "http://macro-oss.oss-cn-shenzhen.aliyuncs.com/mall/images/20180607/timg (1).jpg",
      "bigPic": null,
      "brandStory": "三星的故事"
    }
  }
  return {
    url: 'brand',
    method: 'post',
    data: data
  }
}
export function createBrand() {
  const data = {
    "code": 200,
    "msg": '成功',
    "data": {}
  }
  return {
    url: 'brand/create',
    method: 'post',
    data: data
  }
}
export function deleteBrand() {
  const data = {
    "code": 200,
    "msg": '成功',
    "data": {}
  }
  return {
    url: 'brand/delete',
    method: 'post',
    data: data
  }
}
